home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1993 July / InfoMagic USENET CD-ROM July 1993.ISO / answers / epoch-faq / latexinfo < prev    next >
Encoding:
Text File  |  1993-06-18  |  71.8 KB  |  1,938 lines

  1. Newsgroups: gnu.epoch.misc,news.answers
  2. Path: senator-bedfellow.mit.edu!enterpoop.mit.edu!gatech!howland.reston.ans.net!noc.near.net!uunet!brunix!dbc
  3. From: dbc@cs.brown.edu (Brook Conner)
  4. Subject: GNU Epoch FAQ (LaTeXinfo version)
  5. Message-ID: <latexinfo_740440469@cs.brown.edu>
  6. Followup-To: poster
  7. Summary: Epoch FAQ
  8. Keywords: Epoch FAQ editor emacs X
  9. Sender: news@cs.brown.edu
  10. Supersedes: <latexinfo_739041170@cs.brown.edu>
  11. Reply-To: dbc.epoch-faq@cs.brown.edu
  12. Organization: Brown University Department of Computer Science
  13. Date: Fri, 18 Jun 1993 21:54:35 GMT
  14. Approved: news-answers-request@mit.edu
  15. Expires: Sat, 17 Jul 1993 21:54:29 GMT
  16. Lines: 1919
  17. Xref: senator-bedfellow.mit.edu gnu.epoch.misc:2257 news.answers:9539
  18.  
  19. Archive-name: epoch-faq/latexinfo
  20. Last-modified: Sun May  2 14:39:25 EDT 1993
  21. Version: 2.0
  22. Posting-frequency: bimonthly
  23.  
  24.  
  25. \documentstyle[latexinfo]{report}
  26. \pagestyle{headings}
  27. \begin{document}
  28. \title{Epoch FAQ (Frequently Asked Questions)\\
  29. (or at least Occasionally Wondered-About Questions)}
  30. \author{Maintained by Brook Conner ({\tt dbc.epoch-faq@cs.brown.edu})}
  31. \date{Last Modified Fri Jan 15 12:49:28 EST 1993\\
  32. by Brook Conner ({\tt dbc.epoch-faq@cs.brown.edu})}
  33. \maketitle
  34.  
  35. \newindex{cp}
  36.  
  37. \tableofcontents
  38.  
  39. \setfilename{epochfaq}
  40.  
  41. \node Top, Disclaimer, Index, (dir)
  42. \cindex{What is this?}
  43. \section{What is this?}
  44.  
  45. This is a list of Frequently Asked Questions about the text editor
  46. Epoch.  In common Internet usage, thus, this is the Epoch FAQ.
  47.  
  48. The latest version of this FAQ will be always available via anonymous
  49. FTP to "/anonymous@ftp.ncsa.uiuc.edu:outgoing/marca/epoch" or
  50. "/anonymous@cs.uiuc.edu:pub/epoch-files/epoch"
  51.  
  52. Please feel free to send comments, suggestions, additions, and
  53. corrections to dbc.epoch-faq@cs.brown.edu.
  54.  
  55. \begin{ifinfo}
  56. If you are reading this as a plain text file, not as an Info file, you
  57. can search for topics by searching for the characters \key{^_}.  If you
  58. want to search for a particular topic, for example, `Fred', search for
  59. \key{Node: Fred}.  There is an Index at the end: \key{Node: Index}.
  60.  
  61. Here is a list of the topics covered in this FAQ:
  62. \end{ifinfo}
  63. \begin{menu}
  64. * Epoch and GNU Emacs:: What exactly is Epoch and how is it different
  65. from various versions of Emacs?
  66. * Configuring Epoch:: How can I make Epoch suit me better?
  67. * Windows:: How to do I control Epoch's windows?
  68. * Colors and Fonts:: How do I control colors and fonts?
  69. * Menus:: How can I add menus?
  70. * Keyboard:: How can I ``fix'' the keyboard?
  71. * Highlighting:: How can I get Epoch to highlight important things in
  72. my files?
  73. * Epoch-Specific Emacs Lisp Packages:: What's out there that others
  74. have already written?
  75. * Other Resources:: Where else can I get information about Epoch?
  76. * Advanced Questions:: Hacks to ``fix'' stuff in specific situations.
  77.  
  78. * Disclaimer:: What this FAQ does and doesn't do.
  79. * Latest Changes:: What's new in the FAQ.
  80. * Formatting the FAQ:: How to format this FAQ for printing or browsing.
  81. * Prerequisites:: What you need to know to read the FAQ.
  82. * Contributors:: Who provided the information.
  83. * Index:: An index of the questions and what they're about.
  84. \end{menu}
  85.  
  86. \node Disclaimer, Latest Changes, Top, (dir)
  87. \cindex{Disclaimer}
  88. \section{Disclaimer}
  89.  
  90. Unless otherwise attributed, information below is based only on Yours
  91. Truly's use and experience with Epoch and is BY NO MEANS GUARANTEED to
  92. be correct, complete, or even coherent.  If it works for you, great;
  93. if it doesn't, let me know, but there are no guarantees.
  94.  
  95. Many of the answers given herein APPLY ONLY to Epoch 4.2.  I run Epoch
  96. on SPARCstations, DECstation 5000s, IBM RS/6000s, and HP 700s; other
  97. configurations may behave differently.  Please let me know of any such
  98. differences.
  99.  
  100. \node Latest Changes, Prerequisites, Formatting the FAQ, (dir)
  101. \cindex{Latest Changes}
  102. \section{Latest Changes}
  103.  
  104. No real changes this time around.  Just fixed some typos noticed by
  105. Larry W. Virden (lwv26@cas.org).\cindex{Virden, Larry}  I also added a
  106. section about formatting the FAQ (\pxref{Formatting the FAQ}).
  107.  
  108. \node Formatting the FAQ, Latest Changes, Disclaimer, (dir)
  109. \cindex{Formatting the FAQ}
  110. \section{Formatting the FAQ}
  111.  
  112. As you may have noticed, the FAQ is written in \LaTeX info format.  It
  113. is being posted in \LaTeX info format, and in plain Info format.  The
  114. plain Info version can be read reasonably well without an Info reader
  115. (if you don't agree, please send me mail: dbc.epoch-faq@cs.brown.edu).
  116. Of course, I recommend adding it to your Info tree.  Since an Info file
  117. contains control characters, it is possible that the file got truncated.
  118. If this is a problem for you, let me know, and I can strip out the
  119. control characters before posting.  Of course, this would mean you'd
  120. have to format the \LaTeX info version yourself to get a valid Info
  121. file. 
  122.  
  123. The latest version of \LaTeX info is 1.9, which is available as
  124. /ftp.ensmp.fr:pub/latexinfo/latexinfo-1.9.tar.Z
  125.  
  126. The \LaTeX info distribution contains two important things.  The first
  127. is a style file called \file{latexinfo.sty}, which is used by \LaTeX\
  128. when formatting this FAQ.  The second is a collection of Emacs Lisp
  129. files that allow you to format a \LaTeX info file as an Info file.
  130. Instructions on using these things is included with the \LaTeX info
  131. distribution.  At this time there are a lot of overfull and underfull
  132. hboxes in the file.  This is because of a great preponderance of
  133. verbatim sections.  I'll fix these as soon as I get the chance. 
  134.  
  135. Older versions include:
  136. \begin{itemize}
  137. \item An old version (1.3) of \LaTeX info is available from the GNU Emacs
  138.   Lisp archives, such as
  139.   /gatekeeper.dec.com:/.8/GNU/elisp-archive/packages/latexinfo 
  140. \item I have found a copy of the latest version (1.7) as
  141.   /csc-sun.math.utah.edu:/pub/tex/pub/latexinfo/latexinfo-1.7.tar.z
  142.   If anyone knows of other sites, please let me know. 
  143. \end{itemize}
  144.  
  145.  
  146. \node Prerequisites, Contributors, Formatting the FAQ, (dir)
  147. \cindex{Prerequisites}
  148. \cindex{Manuals}
  149. \cindex{Emacs FAQ}
  150. \section{Prerequisites}
  151.  
  152. In the answers in this FAQ, I assume at least a little familiarity
  153. with GNU Emacs Lisp.  Suggested resources that could be considered
  154. necessary references for material in this FAQ are:
  155.  
  156. \begin{itemize}
  157. \item The GNU Emacs and Epoch manuals (available online via C-h i).
  158.  
  159. \item The GNU Elisp manual (available via anonymous FTP as
  160. /anonymous@prep.ai.mit.edu:pub/gnu/elisp-manual-1.03.tar.Z or
  161. /anonymous@18.71.0.38:pub/gnu/elisp-manual-1.03.tar.Z)
  162.  
  163. \item The gnu.emacs.help FAQ in the file etc/FAQ (the latest version
  164. is available in the gnu.emacs.help Usenet newsgroup or via FTP as
  165. /anonymous@rtfm.mit.edu:pub/usenet/gnu.emacs.help or
  166. /anonymous@18.172.1.27:pub/usenet/gnu.emacs.help
  167. \end{itemize}
  168.  
  169. \node Epoch and GNU Emacs, Configuring Epoch, Advanced Questions, Top
  170. \cindex{Epoch and GNU Emacs}
  171. \section{Epoch and GNU Emacs}
  172.  
  173. \begin{menu}
  174. * What is Epoch?::
  175. * How can I get Epoch?::
  176. * What is the latest version of Epoch?::
  177. * Moving to Epoch 4 broke some lisp code that worked before::
  178. * I switched Epoch versions and my X resources are being ignored::
  179. * What's the difference between Epoch and GNU Emacs version 19?::
  180. \end{menu}
  181. \node What is Epoch?, How can I get Epoch?, , Epoch and GNU Emacs
  182. \cindex{What is Epoch?}
  183. \cindex{Steroids}
  184. \cindex{X11 Windowing System}
  185. \cindex{Features of Epoch}
  186. \subsection{What is Epoch?}
  187.  
  188. Epoch is GNU Emacs on steroids: an adaptation of GNU Emacs with lots
  189. of additional support for features made possible by the X11 windowing
  190. system.  These features include multiple editing windows, arbitrary
  191. colors and fonts (fixed-width and proportional), selectable zones per
  192. buffer with arbitrary display styles (font, color, underline, stipple,
  193. pixmap), an optional separate minibuffer window, improved keyboard and
  194. mouse handling, full 8-bit character set support, and more.
  195.  
  196. Epoch, like GNU Emacs, is very customizable; much of this FAQ
  197. describes ways to customize Epoch for specific purposes.
  198.  
  199. \node How can I get Epoch?, What is the latest version of Epoch?, What is Epoch?, Epoch and GNU Emacs
  200. \cindex{How can I get Epoch?}
  201. \cindex{Where is Epoch?}
  202. \cindex{Finding Epoch}
  203. \cindex{Anonymous FTP}
  204. \subsection{How can I get Epoch?}
  205.  
  206. Epoch is available via anonymous FTP as
  207. /anonymous@cs.uiuc.edu:pub/epoch-files/epoch/epoch-4.2.tar.Z or
  208. /anonymous@128.174.252.1:pub/epoch-files/epoch/epoch-4.2.tar.Z
  209.  
  210. According to Simon Marshall (S.Marshall@sequent.cc.hull.ac.uk):
  211.  
  212. \begin{quote}
  213. Like GNU & X11 stuff, epoch is available in the UK from
  214. uk.ac.ic.doc.src (00000510200001).  You can log on; there's help to
  215. tell you the different ways of getting source.  Epoch is in
  216. /gnu/epoch.
  217. \end{quote}
  218.  
  219. Epoch is also available from
  220. /anonymous@aix370.rrz.uni-koeln.de:gnu/emacs/epoch or
  221. /anonymous@134.95.132.2:gnu/emacs/epoch
  222.  
  223.  
  224. Volunteers for other FTP sites outside the United States, or for
  225. mail access to Epoch source, please step forward.
  226.  
  227. \node What is the latest version of Epoch?, Moving to Epoch 4 broke some lisp code that worked before, How can I get Epoch?, Epoch and GNU Emacs
  228. \cindex{What is the latest version of Epoch?}
  229. \cindex{Version of Epoch}
  230. \cindex{Epoch Version}
  231. \subsection{What is the latest version of Epoch?}
  232.  
  233. The latest version is 4.2.  Previous versions still in use by some
  234. people include 4.0 patchlevels 0,1, and 2, 4.1, the 4.0 alpha and beta
  235. levels, and version 3.2.
  236.  
  237. Epoch 4.2 is based on GNU Emacs 18.58, which is the most recent
  238. version of GNU Emacs.
  239.  
  240. Existing installations of Epoch 4.1 should be upgraded to 4.2 as
  241. soon as possible.
  242.  
  243. \node Moving to Epoch 4 broke some lisp code that worked before, I switched Epoch versions and my X resources are being ignored, What is the latest version of Epoch?, Epoch and GNU Emacs
  244. \cindex{Moving to Epoch 4 broke some lisp code that worked before}
  245. \cindex{Emacs Lisp}
  246. \cindex{Buttons}
  247. \cindex{Zones}
  248. \cindex{Function names changed}
  249. \subsection{Moving to Epoch 4 broke some lisp code that worked before}
  250.  
  251. In one of the beta versions of epoch, the term "button" was replaced
  252. by the term "zone".  The idea was, "button" was misleading (since it
  253. refered to a mouse button or a pushbutton as well).  It didn't really
  254. describe Epoch's attributed text.
  255.  
  256. As a consequence, the names of all the button-related function names
  257. and variables were changed.  There are two ways to deal with this
  258. change:
  259.  
  260. \subsubsection{Fset the function names}
  261.  
  262. Put the following command at the head of each file of elisp code
  263. that uses buttons:
  264.  
  265. \begin{verbatim}
  266.     (require 'button)
  267. \end{verbatim}
  268.  
  269. This simply does a series of fset's to replace the "button" names with
  270. the new "zone" names.
  271.  
  272. \subsubsection{Edit the source}
  273.  
  274. Convert all references of "button" to "zone".  You can use the
  275. function convert-current-buffer in epoch-lisp/convert-buttons.el (in
  276. the Epoch distribution) to do this automatically.
  277.  
  278. NOTE: There may be additional problems; in particular, since
  279. attributes were eliminated in Epoch 4.0, any use of them will have to
  280. be eliminated also.  This is less simple than switching from buttons
  281. to zones.  Fortunately, most Epoch packages on the net now support
  282. 4.0.  Therefore, I won't bother to come up with an answer for this one
  283. (unless someone actually needs to know).
  284.  
  285. \node I switched Epoch versions and my X resources are being ignored, What's the difference between Epoch and GNU Emacs version 19?, Moving to Epoch 4 broke some lisp code that worked before, Epoch and GNU Emacs
  286. \cindex{I switched Epoch versions and my X resources are being ignored}
  287. \cindex{X Resources ignored}
  288. \cindex{Ignored resources}
  289. \cindex{New version}
  290. \subsection{I switched Epoch versions and my X resources are being
  291. ignored}
  292.  
  293. From Martin Boyer (mboyer@ireq-robot.hydro.qc.ca):
  294.  
  295. Old versions of Epoch extracted its X default resources from
  296. the user's .Xdefaults file by hand; this is no longer the case.  If
  297. Epoch isn't picking up resources like previous versions did on your
  298. system, prior to starting Epoch do this:
  299.  
  300. \begin{verbatim}
  301.     xrdb -merge $HOME/.Xdefaults
  302. \end{verbatim}
  303.  
  304. This makes the X server's database pick up and maintain all of the
  305. resource definitions found in $HOME/.Xdefaults.
  306.  
  307. Alternatively, you can use the '-ud' command line flag to force
  308. Epoch to manually scan $HOME/.Xdefaults.
  309.  
  310. A second problem is that Epoch uses the first word in the command
  311. that executed Epoch (argument 0) to search the X resource database for
  312. Epoch resources.  Thus, if you invoke Epoch with the name:
  313. \begin{verbatim}
  314.     epoch-4.2
  315. \end{verbatim}
  316. Epoch will use the string 'epoch-4.2' to search the resource
  317. database, thereby missing the resources specified by the name 'epoch'.
  318. The workaround is to use the '-name' or '-rn' command-line option like
  319. so:
  320. \begin{verbatim}
  321.     epoch-4.2 -name epoch
  322. \end{verbatim}
  323. or:
  324. \begin{verbatim}
  325.     epoch-4.2 -rn epoch
  326. \end{verbatim}
  327. Using -name is more recommended, as it is a sort-of standard option
  328. among X applications (most X Toolkit applications support it).
  329.  
  330. \node What's the difference between Epoch and GNU Emacs version 19?, , I switched Epoch versions and my X resources are being ignored, Epoch and GNU Emacs
  331. \cindex{What's the difference between Epoch and GNU Emacs version 19?}
  332. \cindex{Lucid Emacs}
  333. \cindex{Emacs 19}
  334. \cindex{GNU Emacs 19}
  335. \subsection{What's the difference between Epoch and GNU Emacs version
  336. 19?}
  337.  
  338. To quote directly from the GNU 'status' file (obtained via anonymous
  339. FTP as /anonymous@prep.ai.mit.edu:pub/gnu/status or
  340. /anonymous@18.71.0.38:pub/gnu/status):
  341.  
  342. \begin{quotation}
  343.   Emacs 18 maintenance continues for simple bug fixes.  Version 19
  344.   approaches release, counting among its new features before and after
  345.   change hooks, source-level debugging of Emacs Lisp programs, X
  346.   selection processing, including CLIPBOARD selections, scrollbars,
  347.   support for European character sets, floating point numbers,
  348.   per-buffer mouse commands, interfacing with the X resource manager,
  349.   mouse-tracking, lisp-level binding of function keys, and multiple X
  350.   windows (`screens' to emacs).
  351.  
  352.   Thanks go to Alan Carroll and the people who worked on Epoch for
  353.   generating initial feedback to a multi-windowed emacs.  Emacs 19
  354.   supports two styles of multiple windows, one with a separate screen
  355.   for the minibuffer, and another with a minibuffer attached to each
  356.   screen.\cindex{Carroll, Alan}
  357.  
  358.   A couple of other features of Version 19 are buffer allocation, which
  359.   uses a new mechanism capable of returning storage to the system when a
  360.   buffer is killed, and a new input system--all input now arrives in the
  361.   form of Lisp objects.
  362.  
  363.   Other features under consideration for later releases of Version 19
  364.   include:
  365.  
  366. \begin{itemize}
  367. \item Associating property lists with regions of text in a buffer.
  368. \item Multiple font, color, and pixmaps defined by those properties.
  369. \item Different visibility conditions for the regions, and for various
  370.      windows showing one buffer.
  371. \item Hooks to be run if point or mouse moves outside a certain range.
  372. \item Incrementally saving undo history in a file, so that recover-file
  373.      also reinstalls buffer's undo history.
  374. \item Static menu bars, and better pop-up menus.
  375. \end{itemize}
  376.  
  377. \end{quotation}
  378.  
  379. Epoch currently supports much of the new functionality of GNU Emacs
  380. v19, including some features that apparently won't be immediately
  381. available in GNU Emacs v19 (notably, associating property lists with
  382. regions of text, and multiple fonts/colors/pixmaps defined by those
  383. properties).
  384.  
  385. A postscript to this answer is a message that Richard Stallman
  386. (Mr. Gnu himself) posted to gnu.emacs.help in Apr 1992:
  387.  
  388. \begin{quotation}
  389.   Emacs 19 won't support text highlighting, but a later version will.
  390.  
  391.   We have code basically working for attaching arbitrary properties to
  392.   parts of the text, including choice of font and color.
  393.  
  394.   This feature is designed for attributes which are considered part of
  395.   the text itself.  What Epoch provides is highlighting that is part
  396.   of the presentation of the text, not logically part of the text itself.
  397.   That is useful also; I hope we will find the wherewithal to implement
  398.   that along with the other highlighting features.
  399. \end{quotation}
  400.  
  401. There is also a version of Emacs 19 written by Lucid.  Called "Lucid
  402. Emacs", this is something from its README about it:
  403.  
  404. \begin{quotation}
  405.   Lucid GNU Emacs 19.3 is now available.  This is a version of GNU
  406.   Emacs derived from an early version of Emacs version 19 from the
  407.   Free Software Foundation.
  408.  
  409.   You can get it via anonymous FTP from the host labrea.Stanford.EDU
  410.   (36.8.0.47). It is currently available only by FTP.  We don't have
  411.   the manpower to make tapes right now.
  412.  
  413.   Log in with the user "anonymous" and "username@host" as a password
  414.   (that is, your email address.)  Execute the command "cd
  415.   pub/gnu/lucid/".  These are the files you will find there:
  416.  
  417.   lemacs-19.3.tar.Z
  418.         The complete source distribution.  This file is about 8 megabytes.
  419.         When untarred and uncompressed, the source distribution will take up
  420.         about 20 megs. You will need an additional 12 megs or so to compile it.
  421.  
  422.   lemacs-19.3-sun4.tar.Z
  423.         This is a ready-to-run set of Sun4 executables, and a DOC file.  If
  424.         you want to use these executables, you will still need to get the file
  425.         lemacs-19.3.tar.Z, because Emacs cannot function very well without the
  426.         lisp library online.  This file is about 1.7 megs, 3.8 megs when
  427.         unpacked, 3 megs of which is the Emacs executable itself (2.1 megs if
  428.         stripped.)
  429.  
  430.   Don't forget to set "binary" mode when transferring these files.
  431.   Unpack them with some variation of the command "zcat
  432.   lemacs-19.3.tar.Z | tar -vxf -".
  433.  
  434.   .... [edit out info on lucid emacs mailing lists] ....
  435.  
  436.   Why Another Version of Emacs?
  437.   =============================
  438.  
  439.   Lucid's latest product, Energize, is a C/C++ development
  440.   environment.  Rather than invent (and force our users to learn) a
  441.   new user-interface, we chose to build part of our environment on top
  442.   of the world's best editor, GNU Emacs. (Though our product is
  443.   commercial, the work we did on GNU Emacs is free software, and is
  444.   useful without having to purchase our product.)
  445.  
  446.   We needed a version of Emacs with mouse-sensitive regions, multiple
  447.   fonts, the ability to mark sections of a buffer as read-only, the
  448.   ability to detect which parts of a buffer has been modified, and
  449.   many other features.
  450.  
  451.   Why Not Epoch?
  452.   ==============
  453.  
  454.   For our purposes, the existing version of Epoch was not sufficient;
  455.   it did not allow us to put arbitrary pixmaps/icons in buffers,
  456.   `undo' did not restore changes to regions, regions did not overlap
  457.   and merge their attributes in the way we needed, and several other
  458.   things.
  459.  
  460.   We could have devoted our time to making Epoch do what we needed
  461.   (and, in fact, we spent some time doing that) but, since the FSF
  462.   planned to include Epoch-like features in their version 19, we
  463.   decided that our efforts would be better spent improving Emacs19
  464.   instead of Epoch.
  465.  
  466.   Our original hope was that our changes to Emacs would be
  467.   incorporated into the "official" v19.  However, scheduling conflicts
  468.   arose, and we found that, given the amount of work still remaining
  469.   to be done, we didn't have time to merge with the FSF's code.
  470.   Consequently, we have released our work as a forked branch of Emacs,
  471.   instead of delaying any longer.
  472.  
  473.   It seems likely that a merger of Epoch and Lucid Emacs will occur in
  474.   the not-too-distant future.
  475. \end{quotation}
  476.  
  477.  
  478.  
  479. \node Configuring Epoch, Windows, Epoch and GNU Emacs, Top
  480. \cindex{Configuring Epoch}
  481. \section{Configuring Epoch}
  482.  
  483. \begin{menu}
  484. * How can my .emacs file deal with both GNU Emacs and Epoch?::
  485. * How can I configure Epoch to support full 8-bit character sets?::
  486. * How can I cut and paste between Epoch and OpenLook?::
  487. \end{menu}
  488. \node How can my .emacs file deal with both GNU Emacs and Epoch?, How can I configure Epoch to support full 8-bit character sets?, , Configuring Epoch
  489. \cindex{How can my .emacs file deal with both GNU Emacs and Epoch?}
  490. \cindex{Handling Epoch-specific code}
  491. \cindex{.emacs file}
  492. \subsection{How can my .emacs file deal with both GNU Emacs and Epoch?}
  493.  
  494. An easy way to handle both GNU Emacs and Epoch within the same .emacs
  495. file is to define a variable 'running-epoch' as follows:
  496.  
  497. \begin{verbatim}
  498.   (defvar running-epoch (boundp 'epoch::version))
  499. \end{verbatim}
  500.  
  501. Then, the rest of your .emacs file can look like this:
  502.  
  503. \begin{verbatim}
  504.     (if running-epoch
  505.       (progn
  506.         ... [Epoch-specific code here] ...
  507.     ))
  508.  
  509.   ... [Emacs code here] ...
  510. \end{verbatim}
  511.  
  512. (After this, when I refer to 'your .emacs file', read that as 'the
  513. Epoch-specific portion of your .emacs file', under the assumption that
  514. you have both general and Epoch-specific parts as detailed above.)
  515.  
  516. If you have a large amount of Epoch-specific code it may be better to
  517. put it in a separate file (e.g., "epoch-specific.el"), possibly
  518. byte-compile it, then load it from your .emacs file like so:
  519.  
  520. \begin{verbatim}
  521.     (if (boundp 'epoch::version) (load "epoch-specific"))
  522. \end{verbatim}
  523.  
  524. \node How can I configure Epoch to support full 8-bit character sets?, How can I cut and paste between Epoch and OpenLook?, How can my .emacs file deal with both GNU Emacs and Epoch?, Configuring Epoch
  525. \cindex{How can I configure Epoch to support full 8-bit character sets?}
  526. \cindex{8-bit characters}
  527. \cindex{Eight-bit characters}
  528. \cindex{Character display and input}
  529. \cindex{Display and input of characters}
  530. \cindex{Input and display of characters}
  531. \subsection{How can I configure Epoch to support full 8-bit character
  532. sets?}
  533.  
  534. There are two parts to this: display and input.
  535.  
  536. Display is handled by the variables "meta-printable" and "ctl-arrow".
  537. From the documentation string for "meta-printable":
  538.  
  539. \begin{quotation}
  540.   Non-nil means meta characters, that is characters in the range
  541.   0240..0377, are printable.  Nil means display meta chars  with
  542.   backslash and octal digits.  Automatically becomes local when set in
  543.   any fashion.
  544. \end{quotation}
  545.  
  546. From the documentation string for "ctl-arrow":
  547.  
  548. \begin{quotation}
  549.   t means display control chars with uparrow. Nil means use backslash
  550.   and octal digits. Automatically becomes local when set in any
  551.   fashion.
  552. \end{quotation}
  553.  
  554. Input is handled by the flag "EIGHTBIT_KEYBOARD", which is set in config.h:
  555.  
  556. \begin{verbatim}
  557.   /* Define EIGHTBIT_KEYBOARD if you want keys in range 0240 to 0377
  558.    * to insert corresponding eight-bit characters.
  559.    */
  560.   /* #define EIGHTBIT_KEYBOARD */
  561. \end{verbatim}
  562.  
  563. Define this flag only if you are using a keyboard with direct support
  564. for 8-bit characters.
  565.  
  566.  
  567. \node How can I cut and paste between Epoch and OpenLook?, , How can I configure Epoch to support full 8-bit character sets?, Configuring Epoch
  568. \cindex{OpenLook}
  569. \cindex{Cut and Paste}
  570. \subsection{How can I cut and paste between Epoch and OpenLook?}
  571.  
  572. Arnold Smith (smith@cam.sri.com) says:
  573. \cindex{Smith, Arnold}
  574. \begin{quote}
  575.   Yes it works easily enough, it's just a little awkward in terms of
  576.   the operations required.  Here's the relevant excerpt from my
  577.   epoch-tailoring file (I use a Sun SPARCstation IPX running SunOS
  578.   4.1.2 and OW):
  579. \end{quote}
  580. \begin{verbatim}
  581. ;; Allow cut and paste selections to come from OpenLook windows, by using
  582. ;; CLIPBOARD rather than the default PRIMARY.  From the epoch 4.0 manual...
  583.  
  584. (setq mouse::selection-atom (intern-atom "CLIPBOARD"))
  585. ;; Install handler for selection-clear on this selection
  586. (push-selection mouse::selection-atom 'mouse-clear)
  587.  
  588. ;; The above still doesn't make things entirely simple.  To get text from
  589. ;; an epoch window into a cmdtool or shelltool window, select it by wiping
  590. ;; the cursor across the source selection while holding down the left
  591. ;; mouse key.  Then move the cursor into the destination window and press
  592. ;; the "Paste" key on the left-hand side of the keyboard.  To copy text in
  593. ;; the other direction, select it similarly in the cmdtool window, press
  594. ;; the "Copy" key, move the cursor to the epoch window, and press the
  595. ;; middle mouse button where you want the text to appear.  (Sometimes I
  596. ;; have to actually hold the middle mouse button down for a fraction of a
  597. ;; second---a light click doesn't always seem to register).
  598. \end{verbatim}
  599.  
  600.  
  601. \node Windows, Colors and Fonts, Configuring Epoch, Top
  602. \cindex{Windows}
  603. \section{Windows}
  604.  
  605. \begin{menu}
  606. * How do I get the minibuffer back at the bottom of my edit window?::
  607. * How do I prevent the initial edit window from appearing?::
  608. * How do I stop the windows from automatically raising upon entry?::
  609. * How do I change the cursor?::
  610. * How do I define edit screen attributes on a per-mode basis?::
  611. * How do I make Epoch manage edit window and icon names based on the name of the current buffer(s)?::
  612. * How do I iconify my entire Epoch session at once?::
  613. * Does Epoch support scrollbars?::
  614. * How can I make more room for windows?::
  615. \end{menu}
  616. \node How do I get the minibuffer back at the bottom of my edit window?, How do I prevent the initial edit window from appearing?, , Windows
  617. \cindex{How do I get the minibuffer back at the bottom of my edit window?}
  618. \cindex{One minibuffer window}
  619. \cindex{Minibuffer window}
  620. \subsection{How do I get the minibuffer back at the bottom of my edit
  621. window?}
  622.  
  623. Start Epoch with the command-line option '-nm'.  Alternately, in your
  624. general .Xdefaults file, specify:
  625.  
  626. \begin{example}
  627.     epoch.nonlocal.minibuf: False
  628. \end{example}
  629.  
  630. \node How do I prevent the initial edit window from appearing?, How do I stop the windows from automatically raising upon entry?, How do I get the minibuffer back at the bottom of my edit window?, Windows
  631. \cindex{How do I prevent the initial edit window from appearing?}
  632. \cindex{Inital edit window}
  633. \cindex{First window}
  634. \subsection{How do I prevent the initial edit window from appearing?}
  635.  
  636. In other words, how do I get only the minibuffer upon startup?
  637.  
  638. There is a variable that controls whether or not an initial edit
  639. window will be provided. By default, of course, one is; to stop this
  640. from happening, put the following in your .emacs:
  641.  
  642. \begin{verbatim}
  643.     (setq inhibit-initial-screen-mapping t)
  644. \end{verbatim}
  645.  
  646. This will have no effect if you're using local minibuffers (i.e. when
  647. the minibuffer is a part of each edit window), as described above.
  648.  
  649. [Thanks to Chris Love (love@cs.uiuc.edu).]\cindex{Love, Chris}
  650.  
  651. \node How do I stop the windows from automatically raising upon entry?, How do I change the cursor?, How do I prevent the initial edit window from appearing?, Windows
  652. \cindex{How do I stop the windows from automatically raising upon entry?}
  653. \cindex{Windows pop up, stopping}
  654. \cindex{Pop up windows, stopping}
  655. \cindex{Windows raise on entry}
  656. \cindex{On entry, windows raise}
  657. \subsection{How do I stop the windows from automatically raising upon
  658. entry?}
  659.  
  660. Specify the following in your .emacs file:
  661.  
  662. \begin{verbatim}
  663.     (setq auto-raise-screen 'minibuf)
  664. \end{verbatim}
  665.  
  666. This makes the minibuffer raise when an Epoch edit window is
  667. entered; if you don't want the minibuffer to raise itself either, do
  668. the following instead:
  669.  
  670. \begin{verbatim}
  671.     (setq auto-raise-screen nil)
  672. \end{verbatim}
  673.  
  674. \node How do I change the cursor?, How do I define edit screen attributes on a per-mode basis?, How do I stop the windows from automatically raising upon entry?, Windows
  675. \cindex{How do I change the cursor?}
  676. \cindex{Cursor, changing it}
  677. \cindex{Changing the cursor}
  678. \subsection{How do I change the cursor?}
  679.  
  680. Another noticeable change from GNU Emacs is the cursor glyph (which is
  681. a pencil shape).  To change this to a more normal-appearing arrow
  682. shape, put this in your .emacs file:
  683.  
  684. \begin{verbatim}
  685.     (cursor-glyph 68)
  686.     (cursor-glyph 68 (epoch::minibuf-screen))
  687.     (push '(cursor-glyph . 68) epoch::screen-properties)
  688. \end{verbatim}
  689.  
  690. NOTE: You can specify a different cursor glyph for the minibuffer,
  691. if you like.
  692.  
  693. There are also X resources for the screen and minibuffer cursor
  694. glyphs; equivalent to the above elisp code would be the following (in
  695. your .Xdefaults file):
  696.  
  697. \begin{example}    
  698.     epoch.screen.cursor.glyph: 68
  699.     epoch.minibuf.cursor.glyph: 68
  700. \end{example}
  701.  
  702. For either of these approaches, any valid cursor ID number will do; to
  703. see the available cursors and their ID numbers, take a look at the
  704. file /usr/include/X11/cursorfont.h.
  705.  
  706. (\pxref{How do I define edit screen attributes on a per-mode
  707. basis?}, for details on how to customize the cursor glyph based on
  708. the mode of a screen's initial buffer.)
  709.  
  710. \node How do I define edit screen attributes on a per-mode basis?, How do I make Epoch manage edit window and icon names based on the name of the current buffer(s)?, How do I change the cursor?, Windows
  711. \cindex{How do I define edit screen attributes on a per-mode basis?}
  712. \cindex{Screen attributes}
  713. \cindex{Window attributes}
  714. \cindex{Per-mode window attributes}
  715. \subsection{How do I define edit screen attributes on a per-mode basis?}
  716.  
  717. Or, how do I make my C++ edit windows come up with 48 lines and a big
  718. round dot for a cursor?
  719.  
  720. You can define styles for new edit screens created with
  721. find-file-other-screen (which is, by default, bound to 'C-z 4 C-f' and
  722. 'C-z 4 f') based on the initial buffer's mode like so:
  723.  
  724. \begin{verbatim}
  725.     (setq epoch-mode-alist
  726.       (append (list
  727.           (cons 'c-mode
  728.             (list
  729.               (cons 'geometry "80x52")
  730.               (cons 'cursor-glyph 94)))
  731.           (cons 'LaTeX-mode
  732.             (list
  733.               (cons 'geometry "90x48")
  734.               (cons 'cursor-glyph 58)))
  735.           (cons 'c++-mode
  736.             (list
  737.               (cons 'geometry "80x48")
  738.               (cons 'cursor-glyph 38))))
  739.         epoch-mode-alist))
  740. \end{verbatim}
  741.  
  742. \node How do I make Epoch manage edit window and icon names based on the name of the current buffer(s)?, How do I iconify my entire Epoch session at once?, How do I define edit screen attributes on a per-mode basis?, Windows
  743. \cindex{How do I make Epoch manage edit window and icon names based on the name of the current buffer(s)?}
  744. \cindex{Window and icon names}
  745. \cindex{Icon and window names}
  746. \cindex{Names of icons and windows}
  747. \subsection{How do I make Epoch manage edit window and icon names based
  748. on the name of the current buffer(s)?}
  749.  
  750. The base Epoch distribution doesn't support this, but there have
  751. been a number of small packages written that accomplish this.  There
  752. is one written by Derek Ney (derek@boingo.med.jhu.edu) up for
  753. anonymous FTP at ftp.ncsa.uiuc.edu (141.142.20.50) as
  754. /outgoing/marca/epoch/derek-title.el.Z.  Another one can be found in
  755. the epoch sources at ftp.uu.net (in the directory
  756. /languages/emacs-lisp/epoch).
  757.  
  758. \node How do I iconify my entire Epoch session at once?, Does Epoch support scrollbars?, How do I make Epoch manage edit window and icon names based on the name of the current buffer(s)?, Windows
  759. \cindex{How do I iconify my entire Epoch session at once?}
  760. \cindex{Iconifying all of epoch}
  761. \subsection{How do I iconify my entire Epoch session at once?}
  762.  
  763. By default, 'C-z i' is bound to iconify-screen, which only iconifies
  764. the current edit window.  To iconify everything, define a small
  765. function iconify-everything in your .emacs file like so:
  766.  
  767. \begin{verbatim}
  768.     (defun iconify-everything ()
  769.       "Iconify entire Epoch session at once."
  770.       (interactive)
  771.       (dolist (s (screen-list))
  772.         (iconify-screen s))
  773.       (iconify-screen 0)
  774.     )
  775. \end{verbatim}
  776.  
  777. Then bind it to a key sequence (e.g. \key{C-z C-i}) like so:
  778.  
  779. \begin{verbatim}
  780.     (global-set-key "\C-z\C-i" 'iconify-everything)
  781. \end{verbatim}
  782.  
  783. \node Does Epoch support scrollbars?, How can I make more room for windows?, How do I iconify my entire Epoch session at once?, Windows
  784. \cindex{Does Epoch support scrollbars?}
  785. \cindex{Scrollbars, support of}
  786. \subsection{Does Epoch support scrollbars?}
  787.  
  788. No; native support for scrollbars is a technical challenge that so far
  789. no one has taken up for either GNU Emacs or Epoch.
  790.  
  791. Alternatively, pick up the widgets package from cs.uiuc.edu, in
  792. pub/epoch-files/widgets/widgets.tar.Z.  This is a Motif-only "widget
  793. server" that epoch can talk to.  It will produce a nice Motif
  794. scroll-bar on the side of your epoch screen.  It does a lot more, but
  795. as far as I can tell, that's all it does out of the box (i.e., without
  796. writing some lisp code).  Somebody correct me if I'm wrong, here.
  797.  
  798. [Thanks to Pierre Bondono (bondono@vnet.ibm.com) for the following:]
  799. \cindex{Bondono, Pierre}
  800.  
  801. Related to this, there is a ``scrolling concept'' inside the IMOUSE
  802. packages that may be of interest.  IMOUSE can be found via anonymous
  803. FTP from ireq-robot.hydro.qc.ca (131.195.2.130); see question H-1
  804. below.
  805.  
  806. \node How can I make more room for windows?, , Does Epoch support scrollbars?, Windows
  807. \cindex{How can I make more room for windows?}
  808. \cindex{Window room}
  809. \cindex{Rooms}
  810. \cindex{Virtual Screens}
  811. \subsection{How can I make more room for windows?}
  812.  
  813. My workstation's screen area is overwhelmed by all the windows I
  814. reate in my Epoch editing sessions.  How can I squeeze more windows
  815. into my working environment?
  816.  
  817. This is only a half-facetious question; there's only room on most
  818. workstation screens (usually 1024x768 or 1280x1024 pixels in area) for
  819. a couple of windows with decent-sized fonts.  To help alleviate the
  820. discomfort of cramped space, try the 'tvtwm' window manager.  (I sound
  821. like a cough-drop commercial.)
  822.  
  823. Tvtwm, a superset of the twm window manager, allows windows to be
  824. placed on a virtual root window that can be of any size (for example,
  825. 3000 by 3000 pixels).  This virtual root can be navigated via tvtwm's
  826. 'panner', a reduced-size overview of your entire environment.
  827.  
  828. Tvtwm can be found on your local comp.sources.x archive or in the
  829. X11R4 and X11R5 distributions.  Try anonymous FTP to ftp.uu.net
  830. (137.39.1.9) in /usenet/comp.sources.x.
  831.  
  832. For those people that actually like the OpenLook window manager :-),
  833. a similarly modified version of Olwm can be found in ftp.uu.net
  834. /usenet/comp.sources.x/volume14/olvwm (and a lot of other places,
  835. too).
  836.  
  837. People running on HP workstations can use the rooms metaphor built
  838. into the vuewm.  A similar, but less powerful alternative is the vr
  839. program in the contrib directory at export.lcs.mit.edu.  It, however,
  840. doesn't support spreading epoch windows around different rooms.
  841.  
  842.  
  843. \node Colors and Fonts, Menus, Windows, Top
  844. \cindex{Colors and Fonts}
  845. \section{Colors and Fonts}
  846.  
  847. \begin{menu}
  848. * How do I interactively select my foreground color?::
  849. * How do I switch fonts interactively?::
  850. * How can I associate a certain foreground color with a file?::
  851. * How do I design my own really funky technicolor modeline?::
  852. * How do I replace the mouse region selection underlining with a different style?::
  853. \end{menu}
  854. \node How do I interactively select my foreground color?, How do I switch fonts interactively?, , Colors and Fonts
  855. \cindex{How do I interactively select my foreground color?}
  856. \cindex{Foreground color, interactively setting}
  857. \cindex{Interactively setting foreground color}
  858. \subsection{How do I interactively select my foreground color?}
  859.  
  860. First, define a style for each of your desired foreground colors in
  861. your .emacs file, like so:
  862.  
  863. \begin{verbatim}
  864.     (setq red-style (make-style))
  865.     (set-style-foreground red-style "red")
  866. \end{verbatim}
  867.  
  868. Then, define a short command 'goto-style' like so:
  869.  
  870. \begin{verbatim}
  871.     (defun goto-style (newstyle)
  872.       "Set current buffer to a given font NEWSTYLE."
  873.       (setq buffer-style newstyle)
  874.       (redraw-display))
  875. \end{verbatim}
  876.  
  877. Next, bind commands to keys like so:
  878.  
  879. \begin{verbatim}
  880.     (global-set-key "\C-c1" (definteractive (goto-style red-style)))
  881. \end{verbatim}
  882.  
  883. This binds a command that changes the current foreground color to red
  884. to the key sequence \key{C-c 1}.
  885.  
  886. The following function allows you to interactive specify a new color
  887. for the current buffer's foreground:
  888.  
  889. \begin{verbatim}
  890.     (defun set-foreground (newfg)
  891.       "Set current foreground color to NEWFG."
  892.       (interactive "sForeground color: ")
  893.       (set-style-foreground buffer-style newfg)
  894.       (redraw-display))
  895. \end{verbatim}
  896.  
  897. This function is activated by typing:
  898.  
  899. \begin{example}
  900.     M-x set-foreground
  901. \end{example}
  902.  
  903. Or, it can be bound to a key like so:
  904.  
  905. \begin{verbatim}
  906.     (global-set-key "\C-z\C-s" 'set-foreground)
  907. \end{verbatim}
  908.  
  909. \node How do I switch fonts interactively?, How can I associate a certain foreground color with a file?, How do I interactively select my foreground color?, Colors and Fonts
  910. \cindex{How do I switch fonts interactively?}
  911. \cindex{Fonts, switching interactively}
  912. \cindex{Switching fonts interactively}
  913. \cindex{Changing fonts interactively}
  914. \subsection{How do I switch fonts interactively?}
  915.  
  916. To change fonts, you don't have to define new styles.  Just define a
  917. short command 'goto-font', like so:
  918.  
  919. \begin{verbatim}
  920.     (defun goto-font (newfont)
  921.       "Set current buffer to a given font NEWFONT."
  922.       (font newfont)
  923.       (redraw-display))
  924. \end{verbatim}
  925.  
  926. Then, bind commands to keys like so:
  927.  
  928. \begin{verbatim}
  929.     (global-set-key "\C-c1" (definteractive (goto-font "8x13")))
  930. \end{verbatim}
  931.  
  932. This changes the current edit window's font to "8x13" when the key
  933. sequence 'C-c 1' is entered.
  934.  
  935. The following function allows you to interactively input a font name:
  936.  
  937. \begin{verbatim}
  938.     (defun set-font (newfont)
  939.       "Set current font to NEWFONT."
  940.       (interactive "sFont name: ")
  941.       (font newfont)
  942.       (redraw-display))
  943. \end{verbatim}
  944.  
  945. This function is activated by typing:
  946.  
  947. \begin{example}
  948.     M-x set-font
  949. \end{example}
  950.  
  951. Or, it can be bound to a key like so:
  952.  
  953. \begin{verbatim}
  954.     (global-set-key "\C-z\C-s" 'set-font)
  955. \end{verbatim}
  956.  
  957. If the font you specify with either of these methods isn't valid for
  958. your X server (i.e. if the font doesn't exist in a directory listed in
  959. your X server's font path and in that directory's fonts.dir file, or
  960. isn't available from the font server if you're running X11R5), you
  961. will get this message in your minibuffer:
  962.  
  963. \begin{example}
  964.   Bad font name
  965. \end{example}
  966.  
  967. Font names are ordinary X font names; for example, a 14-point non-bold
  968. non-italic Helvetica font can be referred to as:
  969.  
  970. \begin{example}
  971.   "*helvetica-medium-r-normal--14*"
  972. \end{example}
  973.  
  974. The standard X client 'xlsfonts' will give you a list of the fonts
  975. registered with your X server.  The standard X client 'xfontsel' lets
  976. you interactively put together an X font specification string based on
  977. individual attributes (e.g., family, size).
  978.  
  979. \node How can I associate a certain foreground color with a file?, How do I design my own really funky technicolor modeline?, How do I switch fonts interactively?, Colors and Fonts
  980. \cindex{How can I associate a certain foreground color with a file?}
  981. \cindex{Files, associating colors with}
  982. \cindex{Associating colors with files}
  983. \cindex{Coloring files}
  984. \subsection{How can I associate a certain foreground color with a file?}
  985.  
  986. So that every time I load that file my foreground color is
  987. automatically set?
  988.  
  989. You can easily do this by using GNU Emacs' ability to handle file
  990. variables.  For example, if you have defined style 'red-style' to
  991. specify a red foreground color, and want file 'foobar.c' to always
  992. have the foreground color red, add this to the bottom of 'foobar.c':
  993.  
  994. \begin{verbatim}
  995.     ^L
  996.     /*
  997.     Local Variables:
  998.     buffer-style: red-style
  999.     End:
  1000.     */
  1001. \end{verbatim}
  1002.  
  1003. NOTE: '^L' is a newline character; you can enter one in an edit
  1004. buffer by typing \key{C-q C-l}.
  1005.  
  1006. Then, whenever 'foobar.c' is loaded, the variable 'buffer-style' will
  1007. be set to 'red-style', and as a result the foreground color for that
  1008. buffer will be red.
  1009.  
  1010. \node How do I design my own really funky technicolor modeline?, How do I replace the mouse region selection underlining with a different style?, How can I associate a certain foreground color with a file?, Colors and Fonts
  1011. \cindex{How do I design my own really funky technicolor modeline?}
  1012. \cindex{Modeline, customizing and coloring}
  1013. \subsection{How do I design my own really funky technicolor modeline?}
  1014.  
  1015. Using the tried-and-true Learning By Example(tm) educational method,
  1016. I'll just give the (heavily commented) elisp code I use to define my
  1017. own customized modeline:
  1018.  
  1019. \begin{verbatim}
  1020.   ;; A style to emphasize things I find important
  1021.   (defvar mode:*hilight-style*  (make-style)
  1022.     "Style for modeline hilights"
  1023.   )
  1024.   (let ((s1 mode:*hilight-style*))
  1025.    ;; Do something reasonable if we're on a monochrome screen
  1026.     (if (> (epoch::number-of-colors) 2)
  1027.         (progn
  1028.       (set-style-foreground s1 "#83558c")
  1029.       (set-style-background s1 (foreground)))
  1030.       (progn
  1031.       (set-style-foreground s1 (background))
  1032.       (set-style-background s1 (foreground))))
  1033.     (set-style-font s1 "*helvetica-bold-r-*-*-12-*")
  1034.   )
  1035.  
  1036.   ;; A style for normal modeline contents -- inverted from normal
  1037.   ;;  buffer
  1038.   (defvar mode:*normal-style* (make-style)
  1039.     "Normal modeline style"
  1040.   )
  1041.   (let ((s2 mode:*normal-style*))
  1042.     (set-style-foreground s2 (background))
  1043.     (set-style-background s2 (foreground))
  1044.     (set-style-font s2 "*helvetica-medium-r-*-*-12*")
  1045.   )
  1046.  
  1047.   ;; define  a simpler-looking modeline format
  1048.   (setq default-mode-line-format
  1049.     (list
  1050.       ""
  1051.       'mode:*normal-style*
  1052.       'mode-line-modified
  1053.       ;; Highlight the buffer name
  1054.       'mode:*hilight-style*
  1055.       " %17b"
  1056.       'mode:*normal-style*
  1057.       "   "
  1058.       'global-mode-string
  1059.       "   %[("
  1060.       'mode-name 'minor-mode-alist "%n" 'mode-line-process
  1061.       ")%]--"
  1062.       ;; Highlight where we are in the buffer
  1063.       'mode:*hilight-style*
  1064.       (cons -3 "%p")
  1065.       'mode:*normal-style*
  1066.       "-%-"
  1067.       )
  1068.     )
  1069. \end{verbatim}
  1070.  
  1071.  
  1072. \node How do I replace the mouse region selection underlining with a different style?, , How do I design my own really funky technicolor modeline?, Colors and Fonts
  1073. \cindex{How do I replace the mouse region selection underlining with a different style?}
  1074. \cindex{Mouse selection attributes, changing}
  1075. \cindex{Changing mouse selection attributes}
  1076. \subsection{How do I replace the mouse region selection underlining with
  1077. a different style?}
  1078.  
  1079. The appearance of the region underlined with the mouse is described
  1080. by the style in the variable "motion::style".  You can use the normal
  1081. style functions to manipulate this variable.  For example, you can
  1082. turn off underlining with the following:
  1083.  
  1084. \begin{verbatim}
  1085.     (set-style-underline motion::style nil)
  1086. \end{verbatim}
  1087.  
  1088. Now, nothing will show up.  To have just the text foreground color
  1089. change on mouse selection, do:
  1090.  
  1091. \begin{verbatim}
  1092.     (set-style-foreground motion::style "yellow")
  1093.     (set-style-background motion::style (background))
  1094. \end{verbatim}
  1095.  
  1096. Replace "yellow" with any desired X color name.
  1097.  
  1098. To have the selected region appear as reverse video, try:
  1099.  
  1100. \begin{verbatim}
  1101.     (set-style-foreground motion::style (background))
  1102.     (set-style-background motion::style (foreground))
  1103. \end{verbatim}
  1104.  
  1105. To have the selected region appear with an overlayed diagonal stipple
  1106. pattern, try:
  1107.  
  1108. \begin{verbatim}
  1109.     (set-style-background motion::style "red")
  1110.     (set-style-background-stipple motion::style
  1111.       (make-bitmap 4 4 "\\167\\273\\335\\356"))
  1112. \end{verbatim}
  1113.  
  1114. The style bound to motion::style has default settings as follows:
  1115.  
  1116. \begin{verbatim}
  1117.     (set-style-foreground motion::style (foreground))
  1118.     (set-style-background motion::style (background))
  1119.     (set-style-underline motion::style (foreground))
  1120. \end{verbatim}
  1121.  
  1122.  
  1123. \node Menus, Keyboard, Colors and Fonts, Top
  1124. \cindex{Menus}
  1125. \section{Menus}
  1126. \begin{menu}
  1127. * Does Epoch support popup menus or menubars?::
  1128. \end{menu}
  1129. \node Does Epoch support popup menus or menubars?, , , Menus
  1130. \cindex{Does Epoch support popup menus or menubars?}
  1131. \cindex{Menubars, support of}
  1132. \cindex{Popup menus, support of}
  1133. \subsection{Does Epoch support popup menus or menubars?}
  1134.  
  1135. The base Epoch distribution does not have native support for popup
  1136. menus or menubars.  However, there are other ways to use menus with
  1137. Epoch.
  1138.  
  1139. \subsubsection{Use gwm}
  1140.  
  1141. If you're running the window manager GWM (available via anonymous
  1142. FTP to export.lcs.mit.edu (18.24.0.12) in /contrib/gwm), you can use
  1143. the Epoch contrib 'wm-menu' package (found in the contrib tar file on
  1144. cs.uiuc.edu) to have GWM provide menus that pass messages to Epoch.
  1145.  
  1146. \subsubsection{Use another window manager with xse or gnudoit}
  1147.  
  1148. If you're running a window manager that has user-specifiable menus
  1149. (as all of the common window managers do), you can perform particular
  1150. commands from a menu.  These commands can communicate with epoch, and
  1151. get it to do things.
  1152.  
  1153. One way to do this is to use "xse" (XSendEvent) and send characters
  1154. that happen to be bound to the commands you want to activate.  To bind
  1155. arbitrary commands to menu entries in this manner, you need to define
  1156. a unique keystroke pattern (with global-set-key) for each command and
  1157. then send that keystroke pattern with xsendevent via the menu.  See
  1158. the section on rebind-key (below) for more information on this
  1159. technique.  (Of course, you are also free to have xsendevent send a
  1160. key sequence like 'ESC x u n d o RET' directly to Epoch.)
  1161.  
  1162. A better way is to use gnudoit, which communicates to gnuserv.
  1163. Gnuserv, gnuclient, and gnudoit are replacements for emacsclient and
  1164. its server.  With gnudoit, you can pass in an Emacs Lisp form to
  1165. evaluate, rather than the less readable X Event description for a key
  1166. binding.
  1167.  
  1168. Some window managers (such as TWM) do not allow the user to specify
  1169. client-specific menus -- you can only add menus to all clients.  This
  1170. is not an ideal solution, since all windows (Epoch or not) in the
  1171. session will have the menu attached to them, but it does work and is
  1172. quite convenient for use with Epoch.  Other window managers (Mwm in
  1173. particular) allow you to specify a menu on a client-by-client basis.
  1174. Thus, you can have different menus on terminal windows from on Epoch
  1175. (Mwm will even let you have different menus on different screens and
  1176. on the minibuffer).
  1177.  
  1178. Here's a couple of sample Twm menu descriptions.  Note that these
  1179. would show up on all applications that have title bars.
  1180.  
  1181. \begin{verbatim}
  1182.   menu "epoch"
  1183.   {
  1184.     "Epoch Menu"   f.title
  1185.     "Undo"         ! "xse 'Ctrl<Key>x' '<Key>u'"
  1186.     "Quit"         ! "xse 'Ctrl<Key>x' 'Ctrl<Key>c'"
  1187.   }
  1188.   LeftTitleButton "~/epochbitmap.bm" = f.menu "epoch"
  1189. \end{verbatim}
  1190.  
  1191. Or, using gnudoit (notice the more readable function names):
  1192.  
  1193. \begin{verbatim}
  1194.   menu "epoch"
  1195.   {
  1196.     "Epoch Menu"   f.title
  1197.     "Undo"         ! "gnudoit '(undo)'"
  1198.     "Quit"         ! "gnudoit '(save-buffers-kill-emacs)'"
  1199.   }
  1200.   LeftTitleButton "~/epochbitmap.bm" = f.menu "epoch"
  1201. \end{verbatim}
  1202.  
  1203.  
  1204. Here's an equivalent Mwm menu, along with resources that will place
  1205. the menu only on Epoch windows.
  1206.  
  1207. This goes in your Mwm config file:
  1208.  
  1209. \begin{verbatim}
  1210.   Menu EpochMenu
  1211.   {
  1212.       "Epoch" f.title
  1213.       "Undo"  ! "gnudoit '(undo)'"
  1214.       "Quit"  ! "gnudoit '(save-buffers-kill-emacs)'"
  1215.   }
  1216. \end{verbatim}
  1217.  
  1218. This goes in your X defaults:
  1219.  
  1220. \begin{verbatim}
  1221.   Mwm*epoch*windowMenu: EpochMenu
  1222. \end{verbatim}
  1223.  
  1224. Note the "*epoch*" -- this is the class name of the screen.  If you
  1225. use the -name or -rn options (as described in A-6), this name will
  1226. change.  See the "class" attribute of screens in the epoch manual for
  1227. more on this.
  1228.  
  1229. You can get xsendevent at export.lcs.mit.edu (18.24.0.12) in /contrib
  1230. or at ftp.uu.net (137.39.1.9) in /packages/X/contrib.  Gnuserv,
  1231. gnuclient and gnudoit are available at ee.utah.edu, in
  1232. /emacs/etc/gnuserv (and probably other sites, too, but I can't find
  1233. any with Xarchie -- anyone got a good one?).
  1234.  
  1235. [From Philippe Bondono (bondono@vnet.ibm.com)., with Mwm and
  1236. gnuclient additions by Brook]
  1237.  
  1238. \subsubsection{Use another client}
  1239.  
  1240. A completely different technique involves using a separate X client
  1241. that posts a menu and has Epoch (or for that matter, GNU Emacs)
  1242. receive commands from it.  One example of this technique is
  1243. /gnu/emacs/buttons.tar.Z from anonymous FTP to aix370.rrz.uni-koeln.de
  1244. (134.95.132.2).
  1245.  
  1246. A variant method uses xmenu or xmenu2, which are available at any
  1247. comp.sources.x archive.  (If you don't know of such an archive, try
  1248. anonymous FTP to ftp.uu.net (137.39.1.9) in /usenet/comp.sources.x.)
  1249. After you have compiled xmenu or xmenu2, define the following function
  1250. in your .emacs file:
  1251.  
  1252. \begin{verbatim}
  1253.   (defun interpret-output (process output)
  1254.     (command-execute (car (read-from-string output))))
  1255. \end{verbatim}
  1256.  
  1257. Then you can define other functions that make specific menus, with
  1258. menu entries bound to commands, like the following example shows:
  1259.  
  1260. \begin{verbatim}
  1261.   (defun make-menu ()
  1262.     (interactive)
  1263.     (set-process-filter (start-process "xmenu" nil
  1264.         "/usr/local/bin/xmenu" "-heading" "Epoch Menu"
  1265.         "Undo=undo")
  1266.       'interpret-output))
  1267. \end{verbatim}
  1268.  
  1269. This example uses /usr/local/bin/xmenu to post a one-entry menu to the
  1270. screen; the menu entry's label is "Undo" and the action it triggers in
  1271. Epoch is 'undo'.  Specify as many "Label=action" pairs as you like as
  1272. part of the start-process command.
  1273.  
  1274. [From Philippe Bondono (bondono@vnet.ibm.com).]
  1275.  
  1276. If you use XView/Open Windows, Dev Joneja (dj7@cunixf.cc.columbia.edu)
  1277. has written a menu/button client similar to xmenu; it's available via
  1278. anonymous FTP from ftp.ncsa.uiuc.edu (141.142.20.50) as
  1279. /outgoing/marca/epoch/xvmenu.tar.Z.
  1280.  
  1281. \subsubsection{Use Hyperbole}
  1282.  
  1283. Bob Weiner (rsw@cs.brown.edu) says the following concerning menus
  1284. within Hyperbole:
  1285.  
  1286. \begin{quote}
  1287.   If you use Hyperbole, you know what the Smart Key system is, context
  1288.   sensitive key bindings for many Emacs modes and subsystems.  There is
  1289.   a Smart Menu system that goes along with this but has not been
  1290.   released because it needs some additional menus and some integration
  1291.   work.  It is window manager and window system independent, works under
  1292.   Emacs, with a slightly customized version that can highlight selected
  1293.   menu items and display menus in a separate Epoch screen, and is
  1294.   written entirely in Elisp, so no patching is needed.  It provides much
  1295.   easier subsystem access for novices and experienced users and has been
  1296.   in use at a few sites for the last several years.
  1297.  
  1298.   I'd like to get it in a form for release but won't have the time for
  1299.   several months.  If an experienced Elisp programmer wanted to
  1300.   integrate it with Hyperbole and make any other changes, I [Bob, not
  1301.   Brook] would be willing to send it out and coordinate on and test the
  1302.   final changes.
  1303. \end{quote}
  1304.  
  1305. See the list of FTP sites below for more information on Hyperbole.
  1306.  
  1307. \node Keyboard, Highlighting, Menus, Top
  1308. \cindex{Keyboard}
  1309. \section{Keyboard}
  1310.  
  1311. \begin{menu}
  1312. * How do I make the backspace key work properly?::
  1313. * How can I use Page Up and Page Down keys?::
  1314. * How can I stop function keys from putting garbage in my buffer?::
  1315. * How do I turn the keyboard bell off?::
  1316. \end{menu}
  1317. \node How do I make the backspace key work properly?, How can I use Page Up and Page Down keys?, , Keyboard
  1318. \cindex{How do I make the backspace key work properly?}
  1319. \cindex{Backspace key not working}
  1320. \cindex{Broken backspace key}
  1321. \subsection{How do I make the backspace key work properly?}
  1322.  
  1323. This is actually a GNU Emacs question, but it's included in this FAQ
  1324. because it's probably more important to more people than all the other
  1325. questions here.  (One of the great mysteries of GNU Emacs is why the
  1326. backspace key _still_ doesn't do its job.)
  1327.  
  1328. Here are four ways to fix this:
  1329.  
  1330. \subsubsection{Use rebind-key}
  1331.  
  1332. Put this in your .emacs file:
  1333.  
  1334. \begin{verbatim}
  1335.     (rebind-key "BackSpace" nil "\C-?")
  1336. \end{verbatim}
  1337.  
  1338. This is the cleanest Epoch-specific solution.  It rebinds
  1339. the X representation for the backspace key directly to that of the
  1340. delete key.
  1341.  
  1342. [Thanks to Joe Wells (jbw@bigbird.bu.edu).]\cindex{Wells, Joe}
  1343.  
  1344. Ole Vignes (VIGNES@BG.HBG.HYDRO.NO) suggests this as a slight
  1345. variation:\cindex{Vignes, Ole}
  1346. \begin{quote}
  1347.   I have found that the following definitions for the backspace key 
  1348.   work slightly better than those described in the FAQ file:
  1349.  
  1350. \begin{verbatim}
  1351.      (rebind-key "BackSpace" nil    "\177")
  1352.      (rebind-key "BackSpace" 'shift "\177")
  1353. \end{verbatim}
  1354.  
  1355.   Sending the character "\\177" (DEL) instead of a sequence like
  1356.   "\\C-^bdc" has the advantage that the backspace key can be used to
  1357.   rub out characters inside an isearch. This does not work with the
  1358.   other method. This is particularly handy for me, since I have
  1359.   rebound the Delete key to do the same as "\\C-d", delete-char. The
  1360.   second line is to make sure the backspace key also works when Caps
  1361.   Lock  is on.  :-)
  1362. \end{quote}
  1363.  
  1364. \subsubsection{Use global-set-key and rebind-key}
  1365.  
  1366. Put this in your .emacs file:
  1367.  
  1368. \begin{verbatim}
  1369.     (global-set-key "\C-^bdc" 'backward-delete-char-untabify)
  1370.     (rebind-key "BackSpace" nil "\C-^bdc")
  1371. \end{verbatim}
  1372.  
  1373. This rebinds the X representation for the backspace key to the
  1374. appropriate command for deleting a character backward.  Like the first
  1375. method, this is Epoch-specific.
  1376.  
  1377. If you don't like to have your backspace key also untabify (i.e.,
  1378. convert tags to spaces on the fly), use this instead of the previous
  1379. global-set-key:
  1380.  
  1381. \begin{verbatim}
  1382.     (global-set-key "\C-^bdc" 'backward-delete-char)
  1383. \end{verbatim}
  1384.  
  1385. \subsubsection{Use global-set-key}
  1386.  
  1387. Put this in your .emacs file:
  1388.  
  1389. \begin{verbatim}
  1390.     (global-set-key "\C-h" 'backward-delete-char-untabify)
  1391.     (global-set-key "\C-xh" 'help-command) ; override mark-whole-buffer
  1392. \end{verbatim}
  1393.  
  1394. This makes C-h (the backspace key as well as the Control-h key
  1395. sequence) delete characters backward, and shifts responsibility for
  1396. help to C-x h.  This fix will work for GNU Emacs as well as Epoch.
  1397.  
  1398. If you don't like to have your backspace key also untabify (i.e.,
  1399. convert tabs to spaces on the fly), use this instead of the previous
  1400. global-set-key for C-h:
  1401.  
  1402. \begin{verbatim}
  1403.     (global-set-key "\C-h" 'backward-delete-char)
  1404. \end{verbatim}
  1405.  
  1406. \subsubsection{Use xmodmap}
  1407.  
  1408. Outside of Epoch, you can change the X representation of the
  1409. BackSpace key into a Delete by doing this:
  1410.  
  1411. \begin{example}
  1412.     xmodmap -e "keysym BackSpace = Delete"
  1413. \end{example}
  1414.  
  1415. This approach has the disadvantage of not being done inside
  1416. of Epoch for those who prefer customizing lisp code to customizing
  1417. their system environments.
  1418.  
  1419. [Thanks to Joe Wells (jbw@bigbird.bu.edu).]\cindex{Wells, Joe}
  1420.  
  1421. \node How can I use Page Up and Page Down keys?, How can I stop function keys from putting garbage in my buffer?, How do I make the backspace key work properly?, Keyboard
  1422. \cindex{How can I use Page Up and Page Down keys?}
  1423. \cindex{Using Page Up and Page Down}
  1424. \cindex{Page up or down keys, using}
  1425. \subsection{How can I use Page Up and Page Down keys?}
  1426.  
  1427. How do I make the keys marked "Page Up" and "Page Down" on an IBM
  1428.  Selectric-style keyboard do their jobs?
  1429.  
  1430. Using the key rebinding facility discussed below, you can put the
  1431. following two lines in your .emacs file:
  1432.  
  1433. \begin{verbatim}
  1434.     (rebind-key "Prior" nil "\M-v") ; Note Prior, not Page Up.
  1435.     (rebind-key "Next" nil "\C-v")  ; Note Next, not Page Down.
  1436. \end{verbatim}
  1437.  
  1438. Similarly, if you want "Home" and "End" to go to the beginning and end
  1439. of the current buffer respectively, do:
  1440.  
  1441. \begin{verbatim}
  1442.     (rebind-key "Home" nil "\M-<")
  1443.     (rebind-key "End" nil "\M->")
  1444. \end{verbatim}
  1445.  
  1446. \subsubsection{How do I bind keys in the numeric keypad on an IBM
  1447. Selectric-style
  1448.  keyboard to their obvious functions (arrow movement, home, end, etc.)?}
  1449.  
  1450. Put these lines in your .emacs file:
  1451.  
  1452. \begin{verbatim}
  1453.     (rebind-key "KP_Home" nil "\M-<")
  1454.     (rebind-key "KP_Up" nil "\C-p")
  1455.     (rebind-key "KP_Prior" nil "\M-v")
  1456.     (rebind-key "KP_Left" nil "\C-b")
  1457.     (rebind-key "KP_Begin" nil "\C-l")
  1458.     (rebind-key "KP_Right" nil "\C-f")
  1459.     (rebind-key "KP_End" nil "\M->")
  1460.     (rebind-key "KP_Down" nil "\C-n")
  1461.     (rebind-key "KP_Next" nil "\C-v")
  1462. \end{verbatim}
  1463.  
  1464. NOTE: This makes the keypad arrow keys work, the keypad PgUp/PgDown
  1465. work, and the keypad Home/End go to the beginning/end of the buffer.
  1466.  
  1467. Other keys appropriate for rebinding in a Selectric-style numeric
  1468. keypad include KP_Divide, KP_Multiply, KP_Subtract, KP_Add, KP_Enter,
  1469. KP_Insert, and KP_Delete; see below for more details.
  1470.  
  1471. \subsubsection{What general facilities does Epoch provide for rebinding function
  1472.  keys, and how do I use them?}
  1473.  
  1474. The rebind-key function allows you to rebind any keycode to a new
  1475. string.  An example is probably best to show how this works.  To make
  1476. the key marked "Page Up" (on IBM Selectric-style keyboards) actually
  1477. move the current buffer up a page (like M-v), do:
  1478.  
  1479. \begin{verbatim}
  1480.     (rebind-key "Prior" nil "\M-v")
  1481. \end{verbatim}
  1482.  
  1483. Note that "Prior" is the actual X keysym name for the "Page Up" key;
  1484. to see the X keysym names, refer to /usr/include/X11/keysymdef.h (or
  1485. $OPENWINHOME/include/X11/keysymdef.h on OpenWindows systems).
  1486. (Disregard the leading XK_ in keysymdef.h's definitions for Epoch's
  1487. purposes; thus, X11's "XK_Prior" becomes Epoch's "Prior".  To find out
  1488. which keys are actually active for your keyboard and server, use the
  1489. command "xmodmap -pk".)
  1490.  
  1491. The standard function keys are named F1 through F12, the function keys
  1492. on the left side of a Sun-style keyboard are named L1 through L10, and
  1493. so on.  The keypad apparently cannot be addressed by KP_0 through KP_9
  1494. but must be referenced by names like KP_Left, KP_Up, and so on.
  1495.  
  1496. A simple two-step approach for binding function keys to commands
  1497. involves binding a key to an arbitrary GNU Emacs key encoding (in the
  1498. following example, C-^ k 1) and then binding that encoding to the
  1499. command.  An example that binds the function key marked "End" to an
  1500. arbitrary command (in this case, end-of-line) follows:
  1501.  
  1502. \begin{verbatim}
  1503.     (rebind-key "End" 0 "\C-^k1")
  1504.     (global-set-key "\C-^k1" 'end-of-line)
  1505. \end{verbatim}
  1506.  
  1507. Note that the above is only an example of the two-step method; if you
  1508. really want "End" to do 'end-of-line, do the obvious instead:
  1509.  
  1510. \begin{verbatim}
  1511.     (rebind-key "End" 0 "\C-e")
  1512. \end{verbatim}
  1513.  
  1514. The rebind-key command allows modifiers (e.g. shift, control) to be
  1515. specified; the following example binds Control-"End" to an arbitrary
  1516. command (in this case, end-of-buffer):
  1517.  
  1518. \begin{verbatim}
  1519.     (rebind-key "End" 'control "\C-^Ck1")
  1520.     (global-set-key "\C-^Ck1" 'end-of-buffer)
  1521. \end{verbatim}
  1522.  
  1523. For an example of these principles in action, see the file
  1524. 'amc/keys.el' in the 3.2 contrib directory (which is still up for
  1525. anonymous ftp at cs.uiuc.edu as a separate .tar.Z file) or at
  1526. ftp.ncsa.uiuc.edu in /outgoing/marca/epoch.
  1527.  
  1528. [Thanks to Alan Carroll (carroll@cs.uiuc.edu).]\cindex{Carroll, Alan}
  1529.  
  1530. \node How can I stop function keys from putting garbage in my buffer?, How do I turn the keyboard bell off?, How can I use Page Up and Page Down keys?, Keyboard
  1531. \cindex{How can I stop function keys from putting garbage in my buffer?}
  1532. \cindex{Function keys insert garbage}
  1533. \cindex{Garbage from function keys}
  1534. \subsection{How can I stop function keys from putting garbage in my
  1535. buffer?}
  1536.  
  1537. I want Epoch to disregard accidental presses of function keys that
  1538. insert spurious characters (e.g., "-1~") into the buffer.  Does Epoch
  1539. perchance have some magical way to make this happen?
  1540.  
  1541. Perchance, Epoch does.  The variable epoch::function-key-mapping, if
  1542. set to nil, makes Epoch disregard such keys, unless they're explicitly
  1543. rebound with rebind-key.  You can set this in your .emacs file like
  1544. so:
  1545.  
  1546. \begin{verbatim}
  1547.     (setq epoch::function-key-mapping nil)
  1548. \end{verbatim}
  1549.  
  1550. [Thanks to Alan Carroll (carroll@cs.uiuc.edu).]\cindex{Carroll, Alan}
  1551.  
  1552. \node How do I turn the keyboard bell off?, , How can I stop function keys from putting garbage in my buffer?, Keyboard
  1553. \cindex{How do I turn the keyboard bell off?}
  1554. \cindex{Keyboard bell, turning it off}
  1555. \cindex{Bell, turning it off}
  1556. \subsection{How do I turn the keyboard bell off?}
  1557.  
  1558. The easy answer is to put the following line in your .emacs file:
  1559.  
  1560. \begin{verbatim}
  1561.     (setq epoch::bell-volume -50)
  1562. \end{verbatim}
  1563.  
  1564. Another possibility, if you like visual bells (i.e., having the
  1565. entire edit window flash reverse video instead of hearing an audible
  1566. beep), is to put the following in your .emacs file:
  1567.  
  1568. \begin{verbatim}
  1569.     (epoch::set-bell t)
  1570. \end{verbatim}
  1571.  
  1572. The malicious answer, for those who, like myself, never want to hear
  1573. another beep for the rest of time, is to modify src/x11term.c in the
  1574. Epoch distribution; just change the line that reads:
  1575.  
  1576. \begin{verbatim}
  1577.     XBell (xs->display,volume);
  1578. \end{verbatim}
  1579.  
  1580. To:
  1581.  
  1582. \begin{verbatim}
  1583.     /* XBell (xs->display,volume); */
  1584. \end{verbatim}
  1585.  
  1586. Then recompile.
  1587.  
  1588. \node Highlighting, Epoch-Specific Emacs Lisp Packages, Keyboard, Top
  1589. \cindex{Highlighting}
  1590. \section{Highlighting}
  1591.  
  1592. \begin{menu}
  1593. * How do I highlight regions of text in a buffer with different styles?::
  1594. * Can I use highlighting packages on monochrome displays?::
  1595. \end{menu}
  1596. \node How do I highlight regions of text in a buffer with different styles?, Can I use highlighting packages on monochrome displays?, , Highlighting
  1597. \cindex{How do I highlight regions of text in a buffer with different styles?}
  1598. \cindex{Highlighting regions of text}
  1599. \cindex{Text highlighting}
  1600. \subsection{How do I highlight regions of text in a buffer with
  1601. different styles?}
  1602.  
  1603. While the current Epoch distribution contain plenty of support for
  1604. zones and styles, the enabling mechanisms that make syntax-directed
  1605. highlighting possible, no intrinsic support for such highlighting is
  1606. provided.  This situation may change in subsequent releases of Epoch.
  1607.  
  1608. Three packages that provide varying degrees of support for
  1609. syntax-directed highlighting are:
  1610.  
  1611. \begin{description}
  1612. \item[tek-highlight-2.0.tar.Z] (available from archive.cis.ohio-state.edu
  1613.   or ftp.ncsa.uiuc.edu, see below), which supports comment highlighting
  1614.   in source code as well as support for the Info documentation browser,
  1615.   various mail and news packages, and manual pages.
  1616.  
  1617.   Version 2.1.2 (beta) of tek-highlight is available for anonymous ftp
  1618.   as /rle-vlsi.mit.edu:pub/tek-highlight-2.1.1.beta.shar or
  1619.   /18.62.0.214:pub/tek-highlight-2.1.1.beta.shar 
  1620.   and
  1621.   /rle-vlsi.mit.edu:pub/tek-highlight-diff-2.1.1.beta-2.1.2.beta.shar
  1622.   /18.62.0.214:pub/tek-highlight-diff-2.1.1.beta-2.1.2.beta.shar
  1623.  
  1624.   rwhitby@research.canon.oz.au says:
  1625.   \begin{quote}
  1626.     My thanks go to Luis Miguel Silveira for allowing the use of his
  1627.     machine for ftp access.\cindex{Silveira, Luis Miguel}
  1628.     Please mail any bug reports (and documentation additions) to:
  1629.     rwhitby@research.canon.oz.au 
  1630.   \end{quote}
  1631.  
  1632.  
  1633. \item[lightbrite.tar.Z] (available from ftp.ncsa.uiuc.edu, see below),
  1634.   written by Marc Andreessen to allow per-mode regexp-based
  1635.   highlighting.  Thus, you can have all #define's/#endif's in red,
  1636.   setq's and defun's in green, int/float/double's in yellow, '-->'s in
  1637.   purple, and so on.  Here's something from its README:
  1638. \begin{itemize}
  1639.    \item Accurate comment highlighting.
  1640.    \item Regexp touchup highlighting.
  1641.    \item Easy specification of visual attributes of multiple
  1642.       highlighting styles.
  1643.    \item Instant highlighting (as you type) with adjustable
  1644.       responsiveness.
  1645.    \item Buffer size thresholds for both comment and touchup
  1646.       highlighting.
  1647.    \item Use of minor mode and local keymaps.
  1648.    \item Re-highlight visible screen, current paragraph, current
  1649.       function, immediate area, or entire buffer.
  1650.    \item Large assortment of default mode-specific highlighting
  1651.       patterns.
  1652.    \item Automatic highlight on find-file and/or write-file.
  1653.    \item Special handling of mail and rmail modes.
  1654.    \item Works with both Epoch and Lucid Emacs transparently.
  1655. \end{itemize}
  1656.  
  1657. \item[hilit.el.Z] (most recent version was posted to gnu.emacs.souces and is
  1658.   available from ftp.ncsa.uiuc.edu, see below), which provides
  1659.   source-code comment and regexp highlighting.
  1660. \end{description}
  1661.  
  1662. \node Can I use highlighting packages on monochrome displays?, ,How do I highlight regions of text in a buffer with different styles? , Highlighting
  1663. \cindex{Can I use highlighting packages on monochrome displays?}
  1664. \cindex{Monochrome and highlighting}
  1665. \cindex{Highlighting and monochrome}
  1666. \subsection{Can I use highlighting packages on monochrome displays?}
  1667.  
  1668. Sure.  Most highlighting packages let you specify the attributes
  1669. (e.g., color, font, underlining) of the various styles they use.  For
  1670. example, here's how you could get Lightbrite to show comment
  1671. characters in a different font:
  1672. \begin{verbatim}
  1673.   (defvar brite::comment-styles '(("font" . "*courier-medium-r-normal-*-14-*"))
  1674.     "*Style specification list for comment style.")
  1675. \end{verbatim}
  1676.  
  1677. \xref{How do I highlight regions of text in a buffer with different styles?}
  1678.  
  1679. \node Epoch-Specific Emacs Lisp Packages, Other Resources, Highlighting, Top
  1680. \cindex{Epoch-Specific Emacs Lisp Packages}
  1681. \section{Epoch-Specific Emacs Lisp Packages}
  1682.  
  1683. \begin{menu}
  1684. * Where can I find Epoch-specific emacs lisp packages?::
  1685. * Where can I get a PostScript version of the Epoch manual?::
  1686. \end{menu}
  1687. \node Where can I find Epoch-specific emacs lisp packages?, Where can I get a PostScript version of the Epoch manual?, , Epoch-Specific Emacs Lisp Packages
  1688. \cindex{Where can I find Epoch-specific emacs lisp packages?}
  1689. \cindex{Emacs Lisp packages, locations}
  1690. \cindex{Finding Emacs Lisp packages for Epoch}
  1691. \subsection{Where can I find Epoch-specific emacs lisp packages?}
  1692.  
  1693. Try the following anonymous FTP sites for Epoch-specific emacs lisp
  1694. packages:
  1695.  
  1696. \begin{description}
  1697. \item[aix370.rrz.uni-koeln.de (134.95.132.2)]
  1698.     /gnu/emacs
  1699.  
  1700. \item[archive.cis.ohio-state.edu (128.146.8.52)]
  1701.     /pub/gnu/emacs/elisp-archive/elisp
  1702.     [This is main elisp-archive site; it is mirrored at
  1703.      ftp.uu.net (137.39.1.9) in /languages/emacs-lisp, among other places.
  1704.      Not much Epoch code exists here; in particular, a much more
  1705.      recent version of hilit.el.Z is at ftp.ncsa.uiuc.edu, below.]
  1706.  
  1707. \item[ftp.cs.buffalo.edu (128.205.32.3)]
  1708.     /pub
  1709.     [This is the distribution site for the new Dired, which will
  1710.      be included in Emacs v19; it includes support for Epoch.]
  1711.  
  1712. \item[ftp.ncsa.uiuc.edu (141.142.20.50)]
  1713.     /outgoing/marca/epoch
  1714.     [This is the previous FAQ maintainer's archive of Epoch code; the
  1715.      README file gives an overview of what he considers to be
  1716.      'essential' Epoch packages, and all of those packages
  1717.      are available there.  If he gets out of date on any of
  1718.      these and you notice it, please let him know.]
  1719.  
  1720. \item[icsi-ftp.berkeley.edu (128.32.201.55)]
  1721.     /pub/elisp
  1722.  
  1723. \item[ireq-robot.hydro.qc.ca (131.195.2.130)]
  1724.     /pub/emacs/lisp
  1725.     [This is the distribution site for the IMOUSE package.]
  1726.  
  1727. \item[wilma.cs.brown.edu (128.148.31.66)]
  1728.     /pub/hyperbole
  1729.     [This is the distribution site for the Hyperbole hypertext
  1730.      system, which includes support for Epoch.  Also available
  1731.      separately from here is the wrolo 'rolodex' package, one of the
  1732.      components of Hyperbole.]
  1733. \end{description}
  1734.  
  1735. Also see the contrib tar file found at cs.uiuc.edu, in the same
  1736. directory as the actual Epoch distribution.
  1737.  
  1738. Also watch the gnu.emacs.sources Usenet newsgroup, as well as the
  1739. epoch newsgroup/mailing list (see below).
  1740.  
  1741. Please volunteer the names of any sites not on this list.
  1742.  
  1743. \node Where can I get a PostScript version of the Epoch manual?, , Where can I find Epoch-specific emacs lisp packages?, Epoch-Specific Emacs Lisp Packages
  1744. \cindex{Where can I get a PostScript version of the Epoch manual?}
  1745. \cindex{Epoch manual in PostScript}
  1746. \cindex{PostScript version of Epoch manual}
  1747. \subsection{Where can I get a PostScript version of the Epoch manual?}
  1748.  
  1749. Use anonymous ftp to cs.uiuc.edu (128.174.252.1) in
  1750. /pub/epoch-files/epoch; get epoch-4.0.epoch-man.ps.Z.
  1751.  
  1752.  
  1753. \node Other Resources, Advanced Questions, Epoch-Specific Emacs Lisp Packages, Top
  1754. \cindex{Other Resources}
  1755. \section{Other Resources}
  1756.  
  1757. \begin{menu}
  1758. * What Epoch newsgroups/mailing lists are out there?::
  1759. * Where do I send bug reports?::
  1760. \end{menu}
  1761. \node What Epoch newsgroups/mailing lists are out there?, Where do I send bug reports?, , Other Resources
  1762. \cindex{What Epoch newsgroups/mailing lists are out there?}
  1763. \cindex{Newsgroups}
  1764. \cindex{Mailing lists}
  1765. \subsection{What Epoch newsgroups/mailing lists are out there?}
  1766.  
  1767. The Usenet newsgroup gnu.epoch.misc and the mailing list
  1768. epoch@cs.uiuc.edu are one and the same.  To join the mailing list,
  1769. send a request to epoch-request@cs.uiuc.edu.  (It is best to read the
  1770. newsgroup if you have access to it, to save on network resources and
  1771. the mailing list maintainer's time.)
  1772.  
  1773. For more general information about Epoch and GNU Emacs, see the list
  1774. of resources at the start of this file.
  1775. \node Where do I send bug reports?, , What Epoch newsgroups/mailing lists are out there?, Other Resources
  1776. \cindex{Where do I send bug reports?}
  1777. \cindex{Bugs, reporting}
  1778. \cindex{Reporting bugs}
  1779. \subsection{Where do I send bug reports?}
  1780.  
  1781. Either post to the newsgroup gnu.epoch.misc, or (equivalently) send
  1782. mail to epoch@cs.uiuc.edu (which is the newsgroup).
  1783.  
  1784.  
  1785. \node Advanced Questions, Epoch and GNU Emacs, Other Resources, Top
  1786. \cindex{Advanced Questions}
  1787.  
  1788.  
  1789. \section{Advanced Questions}
  1790.  
  1791. [NOTE: This section is at the end since the questions involve actual
  1792. source-code hacking or problems with specific machine configurations
  1793. that the FAQ moderator cannot personally verify and whose solutions will
  1794. probably involve some sort of hacking.  If these answers helped you,
  1795. please let me know.  If I don't hear of people finding these useful, I'm
  1796. going to remove them.]
  1797.  
  1798. \subsection{Problems with Meta on HPs}
  1799.  
  1800. Epoch 4.0b1 (or later) (as well as GNU Emacs 18.58) built
  1801. under  HP-UX 8.0 and 8.05 apparently don't recognize the Meta key as
  1802. Alt. How can this be fixed?
  1803.  
  1804. Bob Fisher (bob@fisher.depaul.edu) suggests the following command,
  1805. executed once per session, prior to starting Epoch:
  1806.  
  1807. \begin{verbatim}
  1808.           xmodmap -e "clear mod1"        \
  1809.                   -e "add mod1 = Meta_R" \
  1810.                   -e "add mod1 = Meta_L"
  1811. \end{verbatim}
  1812.  
  1813. \subsection{Problems with colors on multiple screens}
  1814. Why do all of Epoch's colors go away when Epoch is run on an
  1815. X11R5 server with multiple screens?
  1816.  
  1817. Dana Chee (dana@thumper.bellcore.com) reports that X11R5 has a new
  1818. SCREEN_RESOURCES property that allows/forces colors to only appear for
  1819. color screens, but Epoch doesn't look at this property.  This bug will
  1820. only bite you if you're running on a multi-screen system.  If it
  1821. happens, there is a workaround; see the xrdb manpage and the xrdb
  1822. option '-all'.
  1823.  
  1824. \subsection{The cursor disappears sometimes}
  1825.  
  1826. Even though Epoch 4.0b1 includes fixes to keep the cursor from
  1827. disappearing (as it does on occasion, especially in a shell, in Epoch
  1828. 4.0b0), the cursor still disappears sometimes.  Is there a fix for
  1829. this?
  1830.  
  1831. First, Epoch 4.0p0 has additional fixes for this problem which
  1832. presumably will supersede the fix given below.
  1833.  
  1834. According to Michael Thome (mthome@bbn.com), activating the XFlush
  1835. code at the end of the CursorToggle routine in 4.0b1's x11term.c seems
  1836. to fix the problem.  (In other words, '#if 0' on line 737 of x11term.c
  1837. should be changed to '#if 1'.)
  1838.  
  1839. \subsection{Immediate iconification on startup}
  1840. I want Epoch to iconify itself immediately upon starting.  To this end,
  1841. in my .emacs file I have (epoch::iconify-screen).  But most (95%) of the
  1842. time this doesn't work.  How can I make it work all the time?
  1843.  
  1844. The technical explanation appears to be that the initial Epoch
  1845. minibuffer and edit screen are unmapped after creation to set some
  1846. properties for ICCCM purposes and then remapped, and this interferes
  1847. with the iconification process.
  1848.  
  1849. One workaround (that may or may not work for you) is to add a sit-for
  1850. command to your .emacs file right before epoch::iconify-screen; for
  1851. example:
  1852.  
  1853. \begin{verbatim}
  1854.     (sit-for 15)
  1855.     (epoch::iconify-screen)
  1856. \end{verbatim}
  1857.  
  1858. [Thanks to Bobby Bodenheimer (bobby@hot.caltech.edu), Simon Kaplan
  1859. (kaplan@cs.uiuc.edu), and Chris Love (love@cs.uiuc.edu).]
  1860. \cindex{Bodenheimer, Bobby}\cindex{Kaplan, Simon}\cindex{Love, Chris}
  1861.  
  1862.  
  1863. \node Contributors, Index, Prerequisites, (dir)
  1864. \cindex{Contributors}
  1865.  
  1866. \section{Contributors}
  1867.  
  1868. Thanks to the following people for contributing to this FAQ (whether
  1869. knowingly or not :-) as well as anyone else I may have inadvertently
  1870. forgotten to list:
  1871.  
  1872. \begin{itemize}
  1873. \item Bobby Bodenheimer (bobby@hot.caltech.edu)
  1874. \cindex{Bodenheimer, Bobby}
  1875. \item Philippe Bondono (bondono@vnet.ibm.com)
  1876. \cindex{Bondono, Philippe}
  1877. \item Martin Boyer (mboyer@ireq-robot.hydro.qc.ca)
  1878. \cindex{Boyer, Martin}
  1879. \item Alan Carroll (carroll@cs.uiuc.edu)
  1880. \cindex{Carroll, Alan}
  1881. \item Nhi Casey (nhi@ariel.aero.org)
  1882. \cindex{Casey, Nhi}
  1883. \item Dana Chee (dana@thumper.bellcore.com)
  1884. \cindex{Chee, Dana}
  1885. \item Alice Chen (alice@innerdoor.austin.ibm.com)
  1886. \cindex{Chen, Alice}
  1887. \item Bob Fisher (bob@fisher.depaul.edu)
  1888. \cindex{Fisher, Bob}
  1889. \item Jerry Graves (jerry@math.ep.utexas.edu)
  1890. \cindex{Graves, Jerry}
  1891. \item Dev Joneja (dj7@cunixf.cc.columbia.edu)
  1892. \cindex{Joneja, Dev}
  1893. \item Simon Kaplan (kaplan@cs.uiuc.edu)
  1894. \cindex{Kaplan, Simon}
  1895. \item Tor Lillqvist (tml@tik.vtt.fi)
  1896. \cindex{Lillqvist, Tor}
  1897. \item Chris Love (love@cs.uiuc.edu)
  1898. \cindex{Love, Chris}
  1899. \item Simon Marshall (S.Marshall@sequent.cc.hull.ac.uk)
  1900. \cindex{Marshall, Simon}
  1901. \item Rob McCool (robm@ncsa.uiuc.edu)
  1902. \cindex{McCool, Rob}
  1903. \item Arnold Smith (smith@cam.sri.com)
  1904. \cindex{Smith, Arnold}
  1905. \item Michael Thome (mthome@bbn.com)
  1906. \cindex{Thome, Michael}
  1907. \item Ole Vignes (VIGNES@BG.HBG.HYDRO.NO)
  1908. \cindex{Vignes, Ole}
  1909. \item Bob Weiner (rsw@cs.brown.edu)
  1910. \cindex{Weiner, Bob}
  1911. \item Joe Wells (jbw@bigbird.bu.edu)
  1912. \cindex{Wells, Joe}
  1913. \end{itemize}
  1914.  
  1915. Thanks particularly to Jerry Graves for much FAQ work.
  1916.  
  1917. Thanks also to all the people who have spent time and effort
  1918. developing Epoch and associated packages.
  1919.  
  1920. And thanks most especially to Marc Andreessen marca@ncsa.uiuc.edu, the
  1921. previous maintainer of this FAQ, who has gone on to greater glory,
  1922. working directly with the epoch team.
  1923. \cindex{Andreessen, Marc}
  1924.  
  1925. \twocolumn
  1926. \node Index, Top, Contributors, (dir)
  1927. \cindex{Index}
  1928. \section{Index}
  1929.  
  1930. This is an index of all the FAQ questions and what they are about.
  1931.  
  1932. \printindex{cp}
  1933.  
  1934. \end{document}
  1935.  
  1936. -- 
  1937. Klacktoveedsedstene
  1938.